#pragma once
#include <nlohmann/json.hpp>
#include <iostream>
#include <fstream>
#include <vector>
#include <qstring.h>
#include <qbytearray.h>
#include <LoggerSingleton/LoggerSingleton.h>
#include <qobject.h>


using json = nlohmann::json;
using namespace nlohmann::literals;
using namespace std;

struct Cmd_Data
{
	string name;
	string data_f;
	string data;
};



class CmdJsonManager : public QObject
{
	Q_OBJECT
public:
	static vector<Cmd_Data> initAllCmds();
	static void addCmd(Cmd_Data& c);
	static void deleteCmd(Cmd_Data& c);
	static void dump();
	

private:
	static json cmd_json;
	static string jsonFile;
	static vector<Cmd_Data> cmd_datas;
	
};
